package com.ruicar.afs.cloud.basic.api.fegin.info;

import com.ruicar.afs.cloud.basic.api.dto.*;
import com.ruicar.afs.cloud.basic.api.reappear.DowdTemRule;
import com.ruicar.afs.cloud.basic.api.reappear.DowdTemVo;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.common.modules.contract.enums.ValidOrInvalidEnum;
import com.ruicar.afs.cloud.common.vo.CollectCancelVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author infinity
 * @version 1.0
 * @date 2020/7/28 14:08
 */
@FeignClient(value = "${com.ruicar.service-names.basic-server}", contextId = "basic-contract")
public interface BasicInfoFeign {

    @ApiOperation("合同信息")
    @PostMapping(value = "/contractInfo/mainInfofindByContractNo")
    public IResponse<BasicMainInfoDto> mainInfofindByContractNo(@RequestParam(value = "contractNo") String contractNo);

    @PostMapping("/receiptHandle/getCollectCancelVo")
    @ApiOperation(value = "获取收据信息")
    IResponse<CollectCancelVo> getCollectCancelVo(@RequestParam("id") Long id);

    @ApiOperation("合同信息车辆信息")
    @PostMapping(value = "/contractInfo/closeContract")
    public IResponse closeContract(@RequestParam(value = "contractNo") String contractNo);


    @ApiOperation("查询合同模板信息")
    @PostMapping(value = "/reprint/ContractQuery")
    IResponse<DowdTemVo> contractQuery(@RequestParam(value = "contractNo") String contractNo);

    @ApiOperation("查询合同模板规则")
    @PostMapping(value = "/reprint/contractQueryRule")
    IResponse<DowdTemRule> contractQueryRule(@RequestParam(value = "contractNo") String contractNo);

    @ApiOperation("处理立即进行扣款的提前还款扣款指令")
    @PostMapping(value = "/debit/debitForPrepaymentImmediately")
    IResponse<PrepaymentDebitDealStatusDto> debitForPrepaymentImmediately(@RequestBody PrepaymentInfoManageDto prepaymentInfoDto);

    @ApiOperation(value = "更新合同状态")
    @PostMapping("/contractInfo/updateContractStatus")
    public IResponse<Boolean> updateContractStatus(@RequestBody ContractStatusConditionDto contractStatus);

    @ApiOperation(value = "更新放款状态")
    @PostMapping("/basicPaymentPool/updateStatus")
    public IResponse<Boolean> updateStatus(@RequestBody PaymentStatusConditionDto paymentStatus);

    @ApiOperation(value = "根据合同号查询放款信息")
    @PostMapping("/basicPaymentPool/getPaymentPool")
    public IResponse<BasicPaymentPoolDto> getPaymentPool(@RequestParam("contractNo") String contractNo);
    @ApiOperation(value = "根据合同号查询提前结清扣款指令是否有效")
    @PostMapping("/debit/getPrepaymentDebitOrderValidation")
    public IResponse<ValidOrInvalidEnum> getPrepaymentDebitOrderValidation(@RequestParam("contractNo") String contractNo);

    @ApiOperation("合同信息")
    @PostMapping(value = "/contractInfo/cancelOrClose")
    public IResponse<String> cancelOrClose(@RequestParam(value = "contractNo") String contractNo);
    @ApiOperation("获取合同当前状态")
    @PostMapping(value = "/contractInfo/getContractStatusByContractNo")
    public IResponse getContractStatusByContractNo(@RequestParam(value = "contractNo") String contractNo);

    @ApiOperation(value = "更新收据表信息")
    @PostMapping("/receiptHandle/updateReceiptRecord")
    public IResponse<String> updateReceiptRecord(@RequestBody ManageOverpaymentDifferenceDto overpaymentDifferenceDto);
}
